<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>网店信息</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/bootstrap-4.6.2-dist/css/bootstrap.css">
  <style>
    body {
      padding: 20px;
      font-family: 'Arial', sans-serif;
      background-color: #f9f9f9;
    }

    h2 {
      text-align: center;
      margin-bottom: 30px;
      font-weight: bold;
      color: #333;
    }

    .form-container {
      max-width: 600px;
      background: #fff;
      padding: 20px;
      border-radius: 10px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      margin: auto;
    }

    .form-group label {
      font-weight: bold;
    }

    .form-control {
      border-radius: 5px;
      padding: 10px;
    }

    .btn-primary {
      width: 100%;
      padding: 10px;
      font-size: 16px;
      border-radius: 5px;
    }

    .alert {
      margin-bottom: 20px;
      padding: 10px;
      border: 1px solid transparent;
      border-radius: 5px;
    }

    .alert-success {
      background-color: #d4edda;
      border-color: #c3e6cb;
      color: #155724;
    }

    .alert-danger {
      background-color: #f8d7da;
      border-color: #f5c6cb;
      color: #721c24;
    }
  </style>
</head>
<body>

<div class="form-container">
  <!-- 提示信息 -->
  <c:if test="${not empty successMessage}">
    <div class="alert alert-success">${successMessage}</div>
  </c:if>
  <c:if test="${not empty errorMessage}">
    <div class="alert alert-danger">${errorMessage}</div>
  </c:if>

  <h2>网店信息</h2>

  <!-- 表单 -->
  <form action="${pageContext.request.contextPath}/shop/update" method="post">
    <input type="hidden" name="id" value="${shop.id}">

    <!-- 网店名称 -->
    <div class="form-group">
      <label for="name">网店名称：</label>
      <input type="text" class="form-control" id="name" name="name" value="${shop.name}" required>
    </div>

    <!-- 网店类型 -->
    <div class="form-group">
      <label for="classify">网店类型：</label>
      <input type="text" class="form-control" id="classify" name="classify" value="${shop.classify}" required>
    </div>

    <!-- 网店描述 -->
    <div class="form-group">
      <label for="description">网店描述：</label>
      <textarea class="form-control" id="description" name="description" rows="5" required>${shop.description}</textarea>
    </div>

    <!-- 提交按钮 -->
    <button type="submit" class="btn btn-primary">修改</button>
  </form>
</div>

</body>
</html>
